package main

import (
	"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api"
	"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models"
	"os"
)

func convertWordToPDF(inputPath, outputPath string) {

	config, _ := models.NewConfiguration("config.json")
	wordsApi, ctx, _ := api.CreateWordsApi(config)

	doc, _ := os.Open("Input.docx")
	options := map[string]interface{}{}
	request := &models.ConvertDocumentRequest{
		Document:  doc,
		Format:    ToStringPointer("pdf"),
		Optionals: options,
	}
	document, err := wordsApi.ConvertDocument(ctx, request)
	if err != nil {
		return err
	}
}

func ToStringPointer(str string) *string {
	return &str
}

func main() {

	convertWordToPDF()
}
